<extend name='layout:index'/>
<block name='content'>

		<body>

    <div class="wrapper wrapper-content animated fadeInRight">
      <div class="row">
      <div class="tabs-container">
		   
      <div class="tab-content">
       <div id="tab-1" class="tab-pane active">
           <div class="panel-body">
			<div class="col-sm-6">
			  <div class="ibox float-e-margins">
			      <div class="ibox-content">
			          <form class="form-horizontal m-t" id="signupForm">
			              <div class="form-group">
			                  <label class="col-sm-3 ">用户名</label>
			                  <div class="col-sm-8">
		                          <input id="name1" name="name1" class="form-control" type="text">
		                      </div>
	              		 </div>
	              		 <div class="form-group">
			                  <label class="col-sm-3 ">会员ID</label>
			                  <div class="col-sm-8">
		                          <input id="id1" name="id1" class="form-control" type="text">
		                      </div>
	              		 </div>
	              		<div class="form-group">
			                  <label class="col-sm-3 ">请输入安全密码</label>
			                  <div class="col-sm-8">
		                          <input id="repassword1" name="repassword1" class="form-control" type="password">
		                      </div>
	              		</div>
	              		
	              		<div class="form-group">
                        <div class="col-sm-12 " style="margin-top:30px">
                        	<a data-toggle="modal" data-target="#myModal" onclick="showinfo()"><button class="btn" type="button" style="background-color: #378cbe;color:white;width: 100%;height: 40px" onclick="f7()">激活</button></a>
                            <!-- <button class="btn" type="submit" style="background-color: #378cbe;color:white;width: 100%;height: 40px" onclick="showinfo();">激活</button> -->
                        </div>
                    </div>
			           </form>
			       </div>
			   </div>
			</div>
			<div class="col-sm-6">
			  <div class="ibox float-e-margins">
			      <div class="ibox-content">
			      	<div class="table-responsive">
					<table class="table table-bordered table-striped table-hover">
						<thead>
							<tr align="center"> 
								<th>用户名</th>
								<th>会员ID</th>
								<th>注册时间</th>
								<!-- <th>会员信息</th> -->
							</tr>
						</thead>
							
							<tbody>
					 						<tr> 
							<td>admin7445</td>
							<td>10026883</td>
							<td>2017-03-15 16:25:01</td>
							<!-- <td><a id='link' class='link' name='?act=jy_info&userid=10026883' style='cursor: pointer;' target='_top'>查看信息</a></td> -->
						</tr>
										</tbody>
					</table>
					<div class="">
<form name="selectPageForm" action="/ELT/zx70/rp_user.php" method="get">


 <div id="pager">
  <span style="margin-right:10px;">总计 <b>1</b>  个记录</span>
      
      </div>


</form>
<script type="Text/Javascript" language="JavaScript">
&lt;!--

function selectPage(sel)
{
  sel.form.submit();
}

//--&gt;
</script>
</div>
					</div>
			       </div>
			   </div>
			</div>
            </div>
        </div>
   </div>
   </div>
</div>
    </div>
    <script src="themes/default/js/jquery.min.js?v=2.1.4"></script>
    <script src="themes/default/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="themes/default/js/content.min.js?v=1.0.0"></script><div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 
<div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
       <!--  <h4 class="modal-title" id="myModalLabel">Modal title</h4> -->
      </div>
      <div class="modal-body">
	      <table class="table table-bordered table-striped table-hover">
				<thead>
					<tr>
						
						<th>会员ID</th>
						<th>用户名</th>
						<th>手机号码</th>
						<th>姓名</th>
						<th>用户等级</th>
						<!-- <th>激活等级</th> -->
					</tr>
				</thead>
					
					<tbody>
				<tr> 
					
					
					<td><span id="user_id"></span></td>
					<td><span id="member_id"></span></td>
					<td><span id="tel"></span></td>
					<td><span id="user_name"></span></td>
					<td><span id="user_level"></span></td>
				</tr>
			</tbody>
			</table>
	        <form class="form-horizontal m-t" id="signupForm" action="rp_user.php?act=act_jh" method="post">
     			 <input id="name" name="name" type="hidden">
     			 <input id="id" name="id" type="hidden">
     			 <input id="repassword" name="repassword" type="hidden">
         		<input class="btn btn-primary" id="queding" value="确定" onclick="return validateForm(this.form);" type="submit">
 			    <button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
 			     <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="dele()" id="shanchu">删除</button>
     		</form>
     		
      </div>
   <!--   <div class="modal-footer">
        <button type="submit" class="btn btn-default" data-dismiss="modal">确定</button>
        <button type="button" class="btn btn-primary">取消</button>
      </div>  -->
    </div>
  </div>
</div>
    <script src="themes/default/js/plugins/layer/layer.min.js"></script>
    <script type="text/javascript" src="js/mui.min.js"></script>
		
		<script>
			var className = document.getElementsByClassName('link');
			for(var i = 0; i &lt; className.length; i++) {
				className[i].addEventListener('tap', function() {
					var href = $(this).attr("name");
					layer.ready(function() {
						layer.open({
							type: 2,
							title: 'layer弹层组件',
							fix: false,
							shadeClose: true,
							maxmin: true,
							area: ['100%', '100%'],
							content: href
						});
					});
				})
			}
		</script>
    <script>
   function validateForm(form) {
    $('#shanchu').attr("disabled","disabled");
        var a = $("#name").val();
        var b = $("#id").val();
            	if(a ==""){
            		alert("用户名不能为空");
            		  $('#shanchu').attr("disabled",false);
            		return false;
            	}

            	if(b ==""){
            		alert("会员id不能为空");
            		  $('#shanchu').attr("disabled",false);
            		return false;
            	}
            	      layer.msg('激活中', {
  icon: 16
  ,shade: 0.01,
  time:100*1000,
});
        		return true;
   }
   function f7(){
$('#shanchu').attr("disabled",false);
$('#queding').attr("disabled",false);
   }

    function check(){
         $('#shanchu').attr("disabled","disabled");
    	var a = $("#name").val();
    	var b = $("#id").val();
    	if(a ==""){
    		alert("用户名不能为空");
    		  $('#shanchu').attr("disabled",false);
    		return false;

    	}
    	
    	if(b ==""){
    		alert("会员id不能为空");

    		return false;
    	}
		return true;
    }
	function showinfo(){
		var username = $("#name1").val();
    	var member_id = $("#id1").val();
    	var password = $("#repassword1").val();
    	$('#id').val(member_id);
    	$('#name').val(username);
    	$('#repassword').val(password);
    	$.ajax({
 			type:"get",
 			url:"rp_user.php?act=aa",
 			dataType:"json",
 			data:{
 				user_id:member_id
 			},
 			success:function(data){
 			
 				$("#user_id").text(data.user_id);
 				$("#member_id").text(data.user_name);
 				$("#user_name").text(data.true_name);
 				$("#user_level").text(data.name);
 				$("#tel").text(data.mobile_phone);
 				
 			}
		}); 
	}
	
   /*  function showinfo(){
  		
    	var username = $("#name").val();
    	var member_id = $("#id").val();
 		$.ajax({
 			type:"get",
 			url:"?act=aa",
 			dataType:"json",
 			success:function(data){
 				alert(data);
 			}
		});
    	
    } */
    
    /*AJAX删除要激活账号的数据*/
	function dele(){
	    $('#queding').attr("disabled","disabled");
    	var username = $("#name1").val();
    	var member_id = $("#id1").val();

    	$.ajax({
 			type:"get",
 			url:"rp_user.php?act=deleinfo",
 			dataType:"json",
 			data:{
 				user_id:member_id,
				user_name:username
 			},
 			success:function(data){
 				if(data == '1'){
 					alert("用户名或ID为空，不能删除！");
 				}
 				if(data == '2'){
 					alert("删除用户不存在！");
 				}
 				if(data == '3'){
 					alert("该用户已经激活不能删除！");
 				}
 				location.href ="rp_user.php?act=zhjh";
 				
 			}
		}); 
    }

</script>
    



</body>
</block>